﻿// =================================================================== 
// 项目说明
//====================================================================
// lsc @Copy Right 2020
// 文件： LiveConcernRepository.cs
// 项目名称：斑马车务
// 创建时间：2020/3/4
// 负责人：lsc
// ===================================================================
using System;
using System.Text;
using System.Collections.Generic;
using YouWei.Infrastructure.Entity;

namespace YouWei.Infrastructure.Repository
{
	/// <summary>
	/// 仓储层
	/// </summary>	
	public class LiveConcernRepository:BaseRepository<LiveConcern>
	{		
    
        #region 构造

        public LiveConcernRepository() : base(){}

        public LiveConcernRepository(string connectionString) : base(connectionString){}

        public LiveConcernRepository(DatabaseContext dbContext) : base(dbContext){}

        #endregion


        /// <summary>
        /// 获取直播室关注信息
        /// </summary>
        /// <param name="playerUserID"></param>
        /// <param name="pusherID"></param>
        /// <returns></returns>
        public LiveConcern GetUserRoomConcernInfo(int playerUserID, int pusherID)
        {
            string sql = "select * from LiveConcern where IsActive=1 and PlayerUserID=@PlayerUserID and PusherID=@PusherID";
            LiveConcern obj = SingleOrDefault(sql, new { PlayerUserID = playerUserID, PusherID = pusherID });
            return obj;
        }
    }
}